import request from "@/utils/request.ts";
import {AxiosPromise} from "axios";
import {LoginParams, LoginResult} from '@/api/user/model'

/**
 * 登录API
 *
 * @param data {LoginParams}
 * @returns
 */
export const loginApi = (data: LoginParams): AxiosPromise<LoginResult> => {
    return request({
        url: '/api/v1/auth/login',
        method: 'post',
        params: data
    });
}
